﻿namespace HRM.CORE.REPORT
{
    using APP.HELPER.Utils.CustomizeToolbox;
    using DevExpress.Utils;
    using DevExpress.XtraPrinting;
    using DevExpress.XtraReports.UI;
    using HRM.CORE;
    using HRM.CORE.CLASS;
    using System; using Extra.ERP;
    using System.ComponentModel;
    using System.Data;
    using System.Drawing;
    using System.Drawing.Printing;

    public class rptSalaryPay1 : XtraReport
    {
        private BottomMarginBand BottomMargin;
        private IContainer components;
        private DetailBand Detail;
        private GroupFooterBand GroupFooter1;
        private GroupHeaderBand GroupHeader1;
        private HRM_SALARY_PAY l_Salary;
        private HRM_SALARY_TABLELIST l_SalaryTableList;
        private string m_EmployeeCode;
        private int m_Order;
        private Guid m_SalaryTableListID;
        private ReportFooterBand ReportFooter;
        private ReportHeaderBand ReportHeader;
        private TopMarginBand TopMargin;
        private XRTableCell txtDate;
        private XRTableCell txtDescription;
        private XRLabel txtEmployeeName;
        private XRLabel txtInformation;
        private XRTableCell txtMoney;
        private XRTableCell txtOrder;
        private XRTableCell txtPayMoney;
        private XRTableCell txtRealMoney;
        private XRLabel txtTitle;
        private XRTableCell txtTotalHonestSalaryMoney;
        private XRTableCell txtTotalMoney;
        private XRLabel txtTotalMoneyText;
        private XRTableCell txtTotalPayMoney;
        private XRTableCell txtTotalRealMoney;
        private XRLabel txtTotalTotalRealMoney;
        private XRLabel xrLabel1;
        private XRLabel xrLabel3;
        private XRLine xrLine1;
        private XRTable xrTable1;
        private XRTable xrTable2;
        private XRTable xrTable4;
        private XRTableCell xrTableCell1;
        private XRTableCell xrTableCell18;
        private XRTableCell xrTableCell19;
        private XRTableCell xrTableCell24;
        private XRTableCell xrTableCell25;
        private XRTableCell xrTableCell3;
        private XRTableCell xrTableCell4;
        private XRTableRow xrTableRow1;
        private XRTableRow xrTableRow2;
        private XRTableRow xrTableRow5;

        public rptSalaryPay1()
        {
            this.components = null;
            this.l_Salary = new HRM_SALARY_PAY();
            this.l_SalaryTableList = new HRM_SALARY_TABLELIST();
            this.m_SalaryTableListID = Guid.Empty;
            this.m_EmployeeCode = "";
            this.m_Order = 0;
            this.InitializeComponent();
        }

        public rptSalaryPay1(Guid SalaryTableListID, string EmployeeCode)
        {
            this.components = null;
            this.l_Salary = new HRM_SALARY_PAY();
            this.l_SalaryTableList = new HRM_SALARY_TABLELIST();
            this.m_SalaryTableListID = Guid.Empty;
            this.m_EmployeeCode = "";
            this.m_Order = 0;
            this.InitializeComponent();
            this.m_SalaryTableListID = SalaryTableListID;
            this.m_EmployeeCode = EmployeeCode;
        }

        protected override void Dispose(bool disposing)
        {
            if (disposing && (this.components != null))
            {
                this.components.Dispose();
            }
            base.Dispose(disposing);
        }

        private void InitializeComponent()
        {
            this.Detail = new DetailBand();
            this.xrTable2 = new XRTable();
            this.xrTableRow2 = new XRTableRow();
            this.txtOrder = new XRTableCell();
            this.txtDate = new XRTableCell();
            this.txtMoney = new XRTableCell();
            this.txtPayMoney = new XRTableCell();
            this.txtRealMoney = new XRTableCell();
            this.txtDescription = new XRTableCell();
            this.TopMargin = new TopMarginBand();
            this.BottomMargin = new BottomMarginBand();
            this.ReportHeader = new ReportHeaderBand();
            this.txtEmployeeName = new XRLabel();
            this.txtInformation = new XRLabel();
            this.xrLine1 = new XRLine();
            this.txtTitle = new XRLabel();
            this.GroupHeader1 = new GroupHeaderBand();
            this.xrTable1 = new XRTable();
            this.xrTableRow1 = new XRTableRow();
            this.xrTableCell1 = new XRTableCell();
            this.xrTableCell3 = new XRTableCell();
            this.xrTableCell4 = new XRTableCell();
            this.xrTableCell19 = new XRTableCell();
            this.xrTableCell24 = new XRTableCell();
            this.xrTableCell18 = new XRTableCell();
            this.ReportFooter = new ReportFooterBand();
            this.txtTotalMoneyText = new XRLabel();
            this.txtTotalTotalRealMoney = new XRLabel();
            this.xrLabel3 = new XRLabel();
            this.xrLabel1 = new XRLabel();
            this.GroupFooter1 = new GroupFooterBand();
            this.xrTable4 = new XRTable();
            this.xrTableRow5 = new XRTableRow();
            this.xrTableCell25 = new XRTableCell();
            this.txtTotalMoney = new XRTableCell();
            this.txtTotalPayMoney = new XRTableCell();
            this.txtTotalRealMoney = new XRTableCell();
            this.txtTotalHonestSalaryMoney = new XRTableCell();
            this.xrTable2.BeginInit();
            this.xrTable1.BeginInit();
            this.xrTable4.BeginInit();
            this.BeginInit();
            this.Detail.Controls.AddRange(new XRControl[] { this.xrTable2 });
            this.Detail.HeightF = 29.16667f;
            this.Detail.Name = "Detail";
            this.Detail.Padding = new PaddingInfo(0, 0, 0, 0, 100f);
            this.Detail.TextAlignment = TextAlignment.TopLeft;
            this.xrTable2.Borders = BorderSide.Bottom | BorderSide.Right | BorderSide.Left;
            this.xrTable2.Font = new Font("Times New Roman", 8.25f);
            this.xrTable2.LocationFloat = new PointFloat(0f, 0f);
            this.xrTable2.Name = "xrTable2";
            this.xrTable2.Padding = new PaddingInfo(4, 0, 0, 0, 100f);
            this.xrTable2.Rows.AddRange(new XRTableRow[] { this.xrTableRow2 });
            this.xrTable2.SizeF = new SizeF(702.4014f, 29.16667f);
            this.xrTable2.StylePriority.UseBorders = false;
            this.xrTable2.StylePriority.UseFont = false;
            this.xrTable2.StylePriority.UsePadding = false;
            this.xrTable2.StylePriority.UseTextAlignment = false;
            this.xrTable2.TextAlignment = TextAlignment.MiddleLeft;
            this.xrTableRow2.Cells.AddRange(new XRTableCell[] { this.txtOrder, this.txtDate, this.txtMoney, this.txtPayMoney, this.txtRealMoney, this.txtDescription });
            this.xrTableRow2.Font = new Font("Times New Roman", 9.75f);
            this.xrTableRow2.Name = "xrTableRow2";
            this.xrTableRow2.StylePriority.UseFont = false;
            this.xrTableRow2.Weight = 1.0;
            this.txtOrder.Font = new Font("Times New Roman", 9.75f);
            this.txtOrder.Name = "txtOrder";
            this.txtOrder.Padding = new PaddingInfo(4, 0, 0, 0, 100f);
            this.txtOrder.StylePriority.UseFont = false;
            this.txtOrder.StylePriority.UsePadding = false;
            this.txtOrder.StylePriority.UseTextAlignment = false;
            this.txtOrder.Text = "txtOrder";
            this.txtOrder.TextAlignment = TextAlignment.MiddleLeft;
            this.txtOrder.Weight = 0.14345303566043449;
            this.txtOrder.BeforePrint += new PrintEventHandler(this.txtOrder_BeforePrint);
            this.txtDate.Font = new Font("Microsoft Sans Serif", 9.75f);
            this.txtDate.Name = "txtDate";
            this.txtDate.Padding = new PaddingInfo(4, 0, 0, 0, 100f);
            this.txtDate.StylePriority.UseFont = false;
            this.txtDate.StylePriority.UsePadding = false;
            this.txtDate.StylePriority.UseTextAlignment = false;
            this.txtDate.Text = "txtDate";
            this.txtDate.TextAlignment = TextAlignment.MiddleCenter;
            this.txtDate.Weight = 0.48262016640455607;
            this.txtDate.BeforePrint += new PrintEventHandler(this.txtDate_BeforePrint);
            this.txtMoney.Font = new Font("Microsoft Sans Serif", 9.75f);
            this.txtMoney.Name = "txtMoney";
            this.txtMoney.Padding = new PaddingInfo(0, 4, 0, 0, 100f);
            this.txtMoney.StylePriority.UseFont = false;
            this.txtMoney.StylePriority.UsePadding = false;
            this.txtMoney.StylePriority.UseTextAlignment = false;
            this.txtMoney.Text = "txtMoney";
            this.txtMoney.TextAlignment = TextAlignment.MiddleRight;
            this.txtMoney.Weight = 0.47691634681570749;
            this.txtPayMoney.Font = new Font("Microsoft Sans Serif", 9.75f);
            this.txtPayMoney.Name = "txtPayMoney";
            this.txtPayMoney.Padding = new PaddingInfo(0, 4, 0, 0, 100f);
            this.txtPayMoney.StylePriority.UseFont = false;
            this.txtPayMoney.StylePriority.UsePadding = false;
            this.txtPayMoney.StylePriority.UseTextAlignment = false;
            this.txtPayMoney.Text = "txtPayMoney";
            this.txtPayMoney.TextAlignment = TextAlignment.MiddleRight;
            this.txtPayMoney.Weight = 0.443892038328247;
            this.txtRealMoney.Font = new Font("Microsoft Sans Serif", 9.75f);
            this.txtRealMoney.Name = "txtRealMoney";
            this.txtRealMoney.Padding = new PaddingInfo(0, 4, 0, 0, 100f);
            this.txtRealMoney.StylePriority.UseFont = false;
            this.txtRealMoney.StylePriority.UsePadding = false;
            this.txtRealMoney.StylePriority.UseTextAlignment = false;
            this.txtRealMoney.Text = "txtRealMoney";
            this.txtRealMoney.TextAlignment = TextAlignment.MiddleRight;
            this.txtRealMoney.Weight = 0.41721950808621883;
            this.txtDescription.Font = new Font("Microsoft Sans Serif", 9.75f);
            this.txtDescription.Name = "txtDescription";
            this.txtDescription.Padding = new PaddingInfo(4, 0, 0, 0, 100f);
            this.txtDescription.StylePriority.UseFont = false;
            this.txtDescription.StylePriority.UsePadding = false;
            this.txtDescription.StylePriority.UseTextAlignment = false;
            this.txtDescription.Text = "txtDescription";
            this.txtDescription.TextAlignment = TextAlignment.MiddleLeft;
            this.txtDescription.Weight = 0.69235739144990371;
            this.TopMargin.HeightF = 70f;
            this.TopMargin.Name = "TopMargin";
            this.TopMargin.Padding = new PaddingInfo(0, 0, 0, 0, 100f);
            this.TopMargin.TextAlignment = TextAlignment.TopLeft;
            this.BottomMargin.HeightF = 56f;
            this.BottomMargin.Name = "BottomMargin";
            this.BottomMargin.Padding = new PaddingInfo(0, 0, 0, 0, 100f);
            this.BottomMargin.TextAlignment = TextAlignment.TopLeft;
            this.ReportHeader.Controls.AddRange(new XRControl[] { this.txtTitle });
            this.ReportHeader.HeightF = 31f;
            this.ReportHeader.Name = "ReportHeader";
            this.txtEmployeeName.Font = new Font("Times New Roman", 11.25f, FontStyle.Bold);
            this.txtEmployeeName.LocationFloat = new PointFloat(6.357829E-05f, 0f);
            this.txtEmployeeName.Name = "txtEmployeeName";
            this.txtEmployeeName.Padding = new PaddingInfo(2, 2, 0, 0, 100f);
            this.txtEmployeeName.SizeF = new SizeF(360.4167f, 17.70833f);
            this.txtEmployeeName.StylePriority.UseFont = false;
            this.txtEmployeeName.Text = "txtEmployeeCode";
            this.txtInformation.Font = new Font("Times New Roman", 11.25f, FontStyle.Bold);
            this.txtInformation.LocationFloat = new PointFloat(360.4167f, 0f);
            this.txtInformation.Name = "txtInformation";
            this.txtInformation.Padding = new PaddingInfo(2, 2, 0, 0, 100f);
            this.txtInformation.SizeF = new SizeF(340.625f, 18.20833f);
            this.txtInformation.StylePriority.UseFont = false;
            this.txtInformation.StylePriority.UseTextAlignment = false;
            this.txtInformation.Text = "txtInformation";
            this.txtInformation.TextAlignment = TextAlignment.MiddleRight;
            this.xrLine1.ForeColor = Color.LightGray;
            this.xrLine1.LocationFloat = new PointFloat(0f, 18.20831f);
            this.xrLine1.Name = "xrLine1";
            this.xrLine1.SizeF = new SizeF(702.4013f, 7.124985f);
            this.xrLine1.StylePriority.UseForeColor = false;
            this.txtTitle.Font = new Font("Times New Roman", 18f, FontStyle.Bold);
            this.txtTitle.LocationFloat = new PointFloat(0f, 0f);
            this.txtTitle.Name = "txtTitle";
            this.txtTitle.Padding = new PaddingInfo(2, 2, 0, 0, 100f);
            this.txtTitle.SizeF = new SizeF(702.4013f, 30.25001f);
            this.txtTitle.StylePriority.UseFont = false;
            this.txtTitle.StylePriority.UseTextAlignment = false;
            this.txtTitle.Text = "PHIẾU THANH TO\x00c1N LƯƠNG";
            this.txtTitle.TextAlignment = TextAlignment.MiddleCenter;
            this.GroupHeader1.Controls.AddRange(new XRControl[] { this.xrTable1, this.txtEmployeeName, this.txtInformation, this.xrLine1 });
            this.GroupHeader1.HeightF = 72f;
            this.GroupHeader1.Name = "GroupHeader1";
            this.xrTable1.AnchorVertical = VerticalAnchorStyles.Bottom;
            this.xrTable1.BackColor = Color.WhiteSmoke;
            this.xrTable1.BorderColor = Color.Black;
            this.xrTable1.Borders = BorderSide.All;
            this.xrTable1.Font = new Font("Times New Roman", 9.75f, FontStyle.Bold);
            this.xrTable1.LocationFloat = new PointFloat(4.768372E-05f, 34.66667f);
            this.xrTable1.Name = "xrTable1";
            this.xrTable1.Rows.AddRange(new XRTableRow[] { this.xrTableRow1 });
            this.xrTable1.SizeF = new SizeF(702.4014f, 37.33333f);
            this.xrTable1.StylePriority.UseBackColor = false;
            this.xrTable1.StylePriority.UseBorderColor = false;
            this.xrTable1.StylePriority.UseBorders = false;
            this.xrTable1.StylePriority.UseFont = false;
            this.xrTable1.StylePriority.UseTextAlignment = false;
            this.xrTable1.TextAlignment = TextAlignment.MiddleCenter;
            this.xrTableRow1.Cells.AddRange(new XRTableCell[] { this.xrTableCell1, this.xrTableCell3, this.xrTableCell4, this.xrTableCell19, this.xrTableCell24, this.xrTableCell18 });
            this.xrTableRow1.Font = new Font("Times New Roman", 11.25f, FontStyle.Bold);
            this.xrTableRow1.Name = "xrTableRow1";
            this.xrTableRow1.StylePriority.UseFont = false;
            this.xrTableRow1.Weight = 1.0;
            this.xrTableCell1.CanGrow = false;
            this.xrTableCell1.Font = new Font("Times New Roman", 9.75f, FontStyle.Bold, GraphicsUnit.Point, 0);
            this.xrTableCell1.Name = "xrTableCell1";
            this.xrTableCell1.StylePriority.UseFont = false;
            this.xrTableCell1.StylePriority.UseTextAlignment = false;
            this.xrTableCell1.Text = "STT";
            this.xrTableCell1.TextAlignment = TextAlignment.MiddleCenter;
            this.xrTableCell1.Weight = 0.14345282266846374;
            this.xrTableCell3.CanGrow = false;
            this.xrTableCell3.Font = new Font("Times New Roman", 9.75f, FontStyle.Bold, GraphicsUnit.Point, 0);
            this.xrTableCell3.Name = "xrTableCell3";
            this.xrTableCell3.StylePriority.UseFont = false;
            this.xrTableCell3.StylePriority.UseTextAlignment = false;
            this.xrTableCell3.Text = "Ng\x00e0y";
            this.xrTableCell3.TextAlignment = TextAlignment.MiddleCenter;
            this.xrTableCell3.Weight = 0.48261991685405986;
            this.xrTableCell4.CanGrow = false;
            this.xrTableCell4.Font = new Font("Times New Roman", 9.75f, FontStyle.Bold, GraphicsUnit.Point, 0);
            this.xrTableCell4.Name = "xrTableCell4";
            this.xrTableCell4.StylePriority.UseFont = false;
            this.xrTableCell4.StylePriority.UseTextAlignment = false;
            this.xrTableCell4.Text = "Số tiền";
            this.xrTableCell4.TextAlignment = TextAlignment.MiddleCenter;
            this.xrTableCell4.Weight = 0.47691624366283114;
            this.xrTableCell19.CanGrow = false;
            this.xrTableCell19.Font = new Font("Times New Roman", 9.75f, FontStyle.Bold, GraphicsUnit.Point, 0);
            this.xrTableCell19.Name = "xrTableCell19";
            this.xrTableCell19.StylePriority.UseFont = false;
            this.xrTableCell19.Text = "Nộp lại";
            this.xrTableCell19.Weight = 0.44389165772135419;
            this.xrTableCell24.CanGrow = false;
            this.xrTableCell24.Font = new Font("Times New Roman", 9.75f, FontStyle.Bold, GraphicsUnit.Point, 0);
            this.xrTableCell24.Name = "xrTableCell24";
            this.xrTableCell24.StylePriority.UseFont = false;
            this.xrTableCell24.Text = "Thực thanh to\x00e1n";
            this.xrTableCell24.Weight = 0.4172196247439417;
            this.xrTableCell18.CanGrow = false;
            this.xrTableCell18.Font = new Font("Times New Roman", 9.75f, FontStyle.Bold, GraphicsUnit.Point, 0);
            this.xrTableCell18.Name = "xrTableCell18";
            this.xrTableCell18.StylePriority.UseFont = false;
            this.xrTableCell18.StylePriority.UseTextAlignment = false;
            this.xrTableCell18.Text = "Ghi ch\x00fa";
            this.xrTableCell18.TextAlignment = TextAlignment.MiddleCenter;
            this.xrTableCell18.Weight = 0.692357237154649;
            this.ReportFooter.Controls.AddRange(new XRControl[] { this.txtTotalMoneyText, this.txtTotalTotalRealMoney, this.xrLabel3, this.xrLabel1 });
            this.ReportFooter.HeightF = 77f;
            this.ReportFooter.Name = "ReportFooter";
            this.txtTotalMoneyText.Font = new Font("Times New Roman", 11f, FontStyle.Italic | FontStyle.Bold, GraphicsUnit.Point, 0);
            this.txtTotalMoneyText.LocationFloat = new PointFloat(119.931f, 46.79165f);
            this.txtTotalMoneyText.Name = "txtTotalMoneyText";
            this.txtTotalMoneyText.Padding = new PaddingInfo(2, 2, 0, 0, 100f);
            this.txtTotalMoneyText.SizeF = new SizeF(582.4705f, 20.00002f);
            this.txtTotalMoneyText.StylePriority.UseFont = false;
            this.txtTotalMoneyText.Text = "Kh\x00f4ng đồng.";
            this.txtTotalTotalRealMoney.Font = new Font("Times New Roman", 11f, FontStyle.Bold, GraphicsUnit.Point, 0);
            this.txtTotalTotalRealMoney.LocationFloat = new PointFloat(202f, 22.91667f);
            this.txtTotalTotalRealMoney.Name = "txtTotalTotalRealMoney";
            this.txtTotalTotalRealMoney.Padding = new PaddingInfo(2, 2, 0, 0, 100f);
            this.txtTotalTotalRealMoney.SizeF = new SizeF(500.4014f, 20.00001f);
            this.txtTotalTotalRealMoney.StylePriority.UseFont = false;
            this.txtTotalTotalRealMoney.Text = "0 VNĐ";
            this.xrLabel3.Font = new Font("Times New Roman", 11f, FontStyle.Bold, GraphicsUnit.Point, 0);
            this.xrLabel3.LocationFloat = new PointFloat(7.152557E-05f, 46.79165f);
            this.xrLabel3.Name = "xrLabel3";
            this.xrLabel3.Padding = new PaddingInfo(2, 2, 0, 0, 100f);
            this.xrLabel3.SizeF = new SizeF(119.9309f, 20f);
            this.xrLabel3.StylePriority.UseFont = false;
            this.xrLabel3.Text = "Số tiền bằng chữ:";
            this.xrLabel1.Font = new Font("Times New Roman", 11f, FontStyle.Bold, GraphicsUnit.Point, 0);
            this.xrLabel1.LocationFloat = new PointFloat(4.768372E-05f, 22.91667f);
            this.xrLabel1.Name = "xrLabel1";
            this.xrLabel1.Padding = new PaddingInfo(2, 2, 0, 0, 100f);
            this.xrLabel1.SizeF = new SizeF(202f, 20.00001f);
            this.xrLabel1.StylePriority.UseFont = false;
            this.xrLabel1.Text = "Tổng tiền thanh to\x00e1n thực tế:";
            this.GroupFooter1.Controls.AddRange(new XRControl[] { this.xrTable4 });
            this.GroupFooter1.HeightF = 29.16667f;
            this.GroupFooter1.Name = "GroupFooter1";
            this.xrTable4.BackColor = Color.WhiteSmoke;
            this.xrTable4.Borders = BorderSide.Bottom | BorderSide.Right | BorderSide.Left;
            this.xrTable4.Font = new Font("Times New Roman", 8.25f, FontStyle.Bold);
            this.xrTable4.LocationFloat = new PointFloat(0f, 0f);
            this.xrTable4.Name = "xrTable4";
            this.xrTable4.Padding = new PaddingInfo(4, 0, 0, 0, 100f);
            this.xrTable4.Rows.AddRange(new XRTableRow[] { this.xrTableRow5 });
            this.xrTable4.SizeF = new SizeF(702.4014f, 29.16667f);
            this.xrTable4.StylePriority.UseBackColor = false;
            this.xrTable4.StylePriority.UseBorders = false;
            this.xrTable4.StylePriority.UseFont = false;
            this.xrTable4.StylePriority.UsePadding = false;
            this.xrTable4.StylePriority.UseTextAlignment = false;
            this.xrTable4.TextAlignment = TextAlignment.MiddleLeft;
            this.xrTableRow5.Cells.AddRange(new XRTableCell[] { this.xrTableCell25, this.txtTotalMoney, this.txtTotalPayMoney, this.txtTotalRealMoney, this.txtTotalHonestSalaryMoney });
            this.xrTableRow5.Name = "xrTableRow5";
            this.xrTableRow5.Weight = 1.0;
            this.xrTableCell25.Font = new Font("Times New Roman", 11f, FontStyle.Bold);
            this.xrTableCell25.Name = "xrTableCell25";
            this.xrTableCell25.Padding = new PaddingInfo(4, 0, 0, 0, 100f);
            this.xrTableCell25.StylePriority.UseFont = false;
            this.xrTableCell25.StylePriority.UsePadding = false;
            this.xrTableCell25.StylePriority.UseTextAlignment = false;
            this.xrTableCell25.Text = "Tổng cộng";
            this.xrTableCell25.TextAlignment = TextAlignment.MiddleLeft;
            this.xrTableCell25.Weight = 0.62607320708391734;
            this.txtTotalMoney.Font = new Font("Microsoft Sans Serif", 9.75f, FontStyle.Bold);
            this.txtTotalMoney.Name = "txtTotalMoney";
            this.txtTotalMoney.Padding = new PaddingInfo(0, 4, 0, 0, 100f);
            this.txtTotalMoney.StylePriority.UseFont = false;
            this.txtTotalMoney.StylePriority.UsePadding = false;
            this.txtTotalMoney.StylePriority.UseTextAlignment = false;
            this.txtTotalMoney.Text = "txtBasicSalary";
            this.txtTotalMoney.TextAlignment = TextAlignment.MiddleRight;
            this.txtTotalMoney.Weight = 0.47691634179678111;
            this.txtTotalPayMoney.Font = new Font("Microsoft Sans Serif", 9.75f, FontStyle.Bold);
            this.txtTotalPayMoney.Name = "txtTotalPayMoney";
            this.txtTotalPayMoney.Padding = new PaddingInfo(0, 4, 0, 0, 100f);
            this.txtTotalPayMoney.StylePriority.UseFont = false;
            this.txtTotalPayMoney.StylePriority.UsePadding = false;
            this.txtTotalPayMoney.StylePriority.UseTextAlignment = false;
            this.txtTotalPayMoney.Text = "txtTotalPayMoney";
            this.txtTotalPayMoney.TextAlignment = TextAlignment.MiddleRight;
            this.txtTotalPayMoney.Weight = 0.44389226916114721;
            this.txtTotalRealMoney.Font = new Font("Microsoft Sans Serif", 9.75f, FontStyle.Bold);
            this.txtTotalRealMoney.Name = "txtTotalRealMoney";
            this.txtTotalRealMoney.Padding = new PaddingInfo(0, 4, 0, 0, 100f);
            this.txtTotalRealMoney.StylePriority.UseFont = false;
            this.txtTotalRealMoney.StylePriority.UsePadding = false;
            this.txtTotalRealMoney.StylePriority.UseTextAlignment = false;
            this.txtTotalRealMoney.Text = "txtTotalRealMoney";
            this.txtTotalRealMoney.TextAlignment = TextAlignment.MiddleRight;
            this.txtTotalRealMoney.Weight = 0.41721901098220038;
            this.txtTotalRealMoney.SummaryCalculated += new TextFormatEventHandler(this.txtTotalRealMoney_SummaryCalculated);
            this.txtTotalHonestSalaryMoney.Font = new Font("Microsoft Sans Serif", 8.25f, FontStyle.Bold);
            this.txtTotalHonestSalaryMoney.Name = "txtTotalHonestSalaryMoney";
            this.txtTotalHonestSalaryMoney.Padding = new PaddingInfo(0, 4, 0, 0, 100f);
            this.txtTotalHonestSalaryMoney.StylePriority.UseFont = false;
            this.txtTotalHonestSalaryMoney.StylePriority.UsePadding = false;
            this.txtTotalHonestSalaryMoney.StylePriority.UseTextAlignment = false;
            this.txtTotalHonestSalaryMoney.TextAlignment = TextAlignment.MiddleRight;
            this.txtTotalHonestSalaryMoney.Weight = 0.69235765772102165;
            base.Bands.AddRange(new Band[] { this.Detail, this.TopMargin, this.BottomMargin, this.ReportHeader, this.GroupHeader1, this.ReportFooter, this.GroupFooter1 });
            base.Font = new Font("Times New Roman", 9.75f);
            base.Margins = new Margins(0x47, 0x34, 70, 0x38);
            base.PageHeight = 0x491;
            base.PageWidth = 0x33b;
            base.PaperKind = PaperKind.A4;
            base.Version = "9.3";
            this.BeforePrint += new PrintEventHandler(this.rptListEmployee_BeforePrint);
            this.xrTable2.EndInit();
            this.xrTable1.EndInit();
            this.xrTable4.EndInit();
            this.EndInit();
        }

        private void LoadAllData()
        {
            DataSet set = new DataSet();
            DataTable list = new DataTable();
            list = this.l_Salary.GetList(this.m_SalaryTableListID, this.m_EmployeeCode);
            set.Tables.Add(list);
            base.DataSource = set;
            this.txtDate.DataBindings.Add("Text", base.DataSource, "Date");
            this.txtMoney.DataBindings.Add("Text", base.DataSource, "Money", "{0:##,##0}");
            this.txtPayMoney.DataBindings.Add("Text", base.DataSource, "PayMoney", "{0:##,##0}");
            this.txtRealMoney.DataBindings.Add("Text", base.DataSource, "RealMoney", "{0:##,##0}");
            this.txtDescription.DataBindings.Add("Text", base.DataSource, "Description", "{0:##,##0}");
            this.txtTotalMoney.DataBindings.Add("Text", base.DataSource, "Money", "{0:##,##0}");
            this.txtTotalPayMoney.DataBindings.Add("Text", base.DataSource, "PayMoney", "{0:##,##0}");
            this.txtTotalRealMoney.DataBindings.Add("Text", base.DataSource, "RealMoney", "{0:##,##0}");
            this.txtTotalMoney.Summary = new XRSummary(SummaryRunning.Group, SummaryFunc.Sum, "{0:##,##0}");
            this.txtTotalPayMoney.Summary = new XRSummary(SummaryRunning.Group, SummaryFunc.Sum, "{0:##,##0}");
            this.txtTotalRealMoney.Summary = new XRSummary(SummaryRunning.Group, SummaryFunc.Sum, "{0:##,##0}");
        }

        private void rptListEmployee_BeforePrint(object sender, PrintEventArgs e)
        {
            this.l_SalaryTableList.GetByID(this.m_SalaryTableListID);
            this.txtTitle.Text = "PHIẾU THANH TO\x00c1N LƯƠNG TH\x00c1NG " + this.l_SalaryTableList.Month.ToString() + " NĂM " + this.l_SalaryTableList.Year.ToString();
            HRM_EMPLOYEE hrm_employee = new HRM_EMPLOYEE();
            hrm_employee.Get(this.m_EmployeeCode);
            this.txtEmployeeName.Text = hrm_employee.EmployeeCode + " - " + hrm_employee.FirstName.ToUpper() + " " + hrm_employee.LastName.ToUpper();
            this.txtInformation.Text = "Chức vụ: " + hrm_employee.Position;
            this.LoadAllData();
            CreateHeaderReport.CreateHeader(this.ReportHeader);
            CreateFooterReport.CreateFooter("IsSalary", this.ReportFooter, this);
        }

        private void txtDate_BeforePrint(object sender, PrintEventArgs e)
        {
            try
            {
                this.txtDate.Text = DateTime.Parse(this.txtDate.Text).ToShortDateString();
            }
            catch
            {
            }
        }

        private void txtOrder_BeforePrint(object sender, PrintEventArgs e)
        {
            this.m_Order++;
            this.txtOrder.Text = this.m_Order.ToString();
        }

        private void txtTotalRealMoney_SummaryCalculated(object sender, TextFormatEventArgs e)
        {
            try
            {
                this.txtTotalTotalRealMoney.Text = decimal.Parse(e.Text).ToString("##,##0") + " VNĐ";
                this.txtTotalMoneyText.Text = GridCalendarControlLib.ToText(decimal.Parse(e.Text));
            }
            catch
            {
            }
        }
    }
}

